package tr.com.netgis;

import tr.com.netgis.pojo.NGLocation;
import android.os.Parcel;
import android.os.Parcelable;

/**
 * 
 * @author NetGis
 *
 */
public class SetLocationResult implements Parcelable {

	private String mData;
	
	private NGLocation location;
	
	private String about;

	
	public String getmData() {
		return mData;
	}

	public void setmData(String mData) {
		this.mData = mData;
	}

	public NGLocation getLocation() {
		return location;
	}

	public void setLocation(NGLocation location) {
		this.location = location;
	}

	public SetLocationResult () {
		mData = "";
	}
	
	public void add (String aut) {
		mData += "\n" + aut;
	}
	
	public void add (NGLocation loc) {
		this.location = loc;
	}
	
	private SetLocationResult(Parcel in) {
		mData = in.readString();
		about = in.readString();
		location = in.readParcelable(NGLocation.class.getClassLoader());
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(mData);
		dest.writeString(about);
		dest.writeParcelable(location, Parcelable.CONTENTS_FILE_DESCRIPTOR);
		
	}

	public String getAbout() {
		return about;
	}

	public void setAbout(String about) {
		this.about = about;
	}

	public static final Parcelable.Creator<SetLocationResult> CREATOR = new Parcelable.Creator<SetLocationResult>() {
		public SetLocationResult createFromParcel(Parcel in) {
			return new SetLocationResult(in);
		}

		public SetLocationResult[] newArray(int size) {
			return new SetLocationResult[size];
		}
	};

}
